package code;

public class QuestionNum_04_9 {
    public static void main(String[] args) {
        //A:二维数组遍历获取到每一个值
        int[][] intArr = {{12,3,8},{11,8,32,7},{13,44,55}};
        for (int i=0;i<intArr.length;i++){
            for (int j=0;j<intArr[i].length;j++){
                System.out.println(intArr[i][j]);
            }
        }

        //B:公司年销售额求和
        int sum = 0;
        int[][] sumArray={{22,66,44},{77,33,88},{25,45,65},{11,66,99}};
        for (int i=0;i<sumArray.length;i++){
            for (int j=0;j<sumArray[i].length;j++){
                System.out.println(sumArray[i][j]);
                sum += sumArray[i][j];
            }
        }
        System.out.println("年销售额为:"+sum+"万元");
    }
}
